package com.xuetang9.t9.hotel.services;

import com.xuetang9.t9.hotel.beans.EConsumption;
import com.xuetang9.t9.hotel.mapper.condition.impl.EConsumptionCondition;
import com.xuetang9.t9.hotel.utils.PageBean;

import java.util.List;

/**
 * @ProjectName: MyHotelProject
 * @Package: com.xuetang9.t9.hotel.service
 * @ClassName: IEConsumptionService
 * @Author: ChinaHp
 * @Description: 餐饮服务层接口
 * @Date: 2020/2/24 16:16
 * @Version: 1.0
 */
public interface IEConsumptionService {
    /*
     * @Description 添加待付款订单
     * @param ec
     * @return int
     * @date 2020/3/11 11:05
     * auther ASUS
     */
    boolean addAfterJoinEat(EConsumption ec);
    /*
     * @Description 添加已付款订单
     * @param ec
     * @return int
     * @date 2020/3/11 11:05
     * auther ASUS
     */
    boolean addNowJoinEat(EConsumption ec);
    /*
     * @Description 添加免单订单
     * @param ec
     * @return int
     * @date 2020/3/11 11:06
     * auther ASUS
     */
    boolean addFreeJoinEat(EConsumption ec);

    /**
     * 获取当页数据
     * @param currPage
     * @param size
     * @return
     */
    List<EConsumption> getDealData(int currPage, int size);

    /**
     * 根据开始和结束时间获取当页数据
     * @param start
     * @param end
     * @param currPage
     * @param size
     * @return
     */
    List<EConsumption> dateFilter(String start,String end ,int currPage,int size);

    /**
     * 根据id获取当页数据
     * @param id
     * @param currPage
     * @param size
     * @return
     */
    List<EConsumption> idFilter(int id ,int currPage,int size);

    /**
     * 通过状态获取当页数据
     * @param state
     * @param currPage
     * @param size
     * @return
     */
    List<EConsumption> stateFilter(String state,int currPage,int size);

    /**
     * 获取总页数
     * @param size
     * @return
     */
    long getSumPage(int size);

    /**
     *获取当天实付金额
     * @return
     */
    Object getTodayIncome();

    /**
     * 获取总的实付金额
     * @return
     */
    long getLjMoney();

    /**
     * 获取已经结账的实付金额
     * @return
     */
    long getJyMoney();

    /**
     * 修改
     * @param eConsumption
     * @return
     */
    boolean update(EConsumption eConsumption);

    /**
     * 通过id查询
     * @param id
     * @return
     */
    EConsumption find(int id);

    /**
     * 添加外带订单
     * @param eConsumption
     * @return
     */
    boolean addOuterEat(EConsumption eConsumption);

    /**
     * 添加店吃订单
     * @param eConsumption
     * @return
     */
    boolean addJoinEat(EConsumption eConsumption);


    /**
     * 根据条件查询
     * @return
     */
    PageBean queryByAll(EConsumptionCondition consumptionCondition);


    /**
     * 根据条件查询总条数
     * @return
     */
    Long queryByCount(EConsumptionCondition consumptionCondition);

    List<EConsumption> queryAll();


    /**
     * 根据餐桌查询就餐订单
     * @param id
     * @return
     */
    EConsumption selectByTableId(Integer id);


    /**
     * 根据id查询外带的信息
     * @param id
     * @return
     */
    EConsumption selectByBesides(Integer id);

}
